package com.atguigu.gmall.cart.client;

import com.atguigu.gmall.model.cart.CartInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @Author BrookPeng
 * @Date 2020/12/4 16:54
 * @Version 1.0
 */
@FeignClient(name = "service-cart")
public interface FeignCartClient {

    // 加入购物车 临时用户/登陆用户
    @GetMapping("/api/cart/addCart/{skuId}/{skuNum}")
    public CartInfo addCart(
            @PathVariable("skuId") Long skuId,
            @PathVariable("skuNum") Integer skuNum
    );

    // 商品清单
    @GetMapping("/api/cart/getCartCheckedList")
    public List<CartInfo> getCartCheckedList();
}
